/// CGFXShader.h
/// Matthew DiBernardo (Cryptex)
/// 07.28.09
///
/// Defines the CGFXShader class, a derivative of Shader designed to
/// implement the functionality required by a Shader using NVidia's
/// CgFX language.

#ifndef _CGFXSHADER_H_
#define _CGFXSHADER_H_

#include "Shader.h"
#include <Cg\cg.h>
#include <Cg\CgGL.h>
#include <vector>

class CGFXShader : public Shader
{
private:
	//CGprogram m_program;
	CGeffect m_effect;
	std::vector<CGpass> m_pass;

	// Matrix Params
	CGparameter WorldViewProj;
	CGparameter WorldViewIT;

public:
	~CGFXShader();

	// LoadEffect()
	// -- Loads an effect from a CgFX file.
	// Input: context - The CGcontext which the shader should be made with.
	// Input: fxName - The name of the cgfx file to load.
	virtual bool LoadEffect(CGcontext context, std::string fxName);

	// SetTechnique()
	// -- Activates the default technique
	virtual void SetTechnique() {}

	// BindShader()
	// -- Binds the shader to the OpenGL render context
	virtual void BindShader(void);

	// UnbindShader()
	// -- Unbinds the shader from the OpenGL render context
	virtual void UnbindShader(void);

	// BindPass()
	// -- Binds a specified pass to the OpenGl render context
	// Input: _pass - The current pass to be bound.
	virtual bool BindPass(unsigned int _pass);
};

#endif